program main

    type line_t
        real :: len
    end type line_t
    type(line_t) :: line(3)

    call get(len=line(:)%len)
    call prt(len=[line(:)%len])

contains

    subroutine prt(len)
        real, intent(in) :: len(:)

        print *, len

    end subroutine prt

    elemental subroutine get(len)
        real, intent(inout) :: len

        len = 3

    end subroutine

end program main

!    3.00000000       3.00000000       3.00000000